<form name="frmx">   
  <div align="left">Download Files:<BR>
    <Select name="dwnlst1">
      <?php
$hnd=opendir("./downloads_".$_SESSION['SITE_ID']);
while($file=readdir($hnd))
{	
	if($file!="." && $file!=".." && $file!="WS_FTP.LOG" && $file!="Thumbs.db")
	{?>
      <option value="<?php echo $file; ?>"><?php echo $file;?></option>
      <?php }	
}
closedir($hnd);
?>
      </select>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <BR>
    <input type="button" name="btn_dwnld" value="Download" onclick="javascript: window.open('f_dwnld.php?site_id=<?php echo $_SESSION['SITE_ID'];?>&fname='+ document.frmx.dwnlst1[document.frmx.dwnlst1.selectedIndex].value);">    
  </div>
</form>
